Decoder-side motion vector derivation

ABSTRACT

A device for decoding video data determines a block of video data is coded in an inter prediction mode; implicitly determines that a decoder-side motion vector derivation (DMVD) mode is enabled for the block of video data; determines motion information for the block of video data; uses the motion information to determine a reference block in accordance with the DMVD mode; and generates a predictive block for the block of video data based on the reference block.

This Application claims the benefit of U.S. Provisional PatentApplication No. 62/475,042 filed 22 Mar. 2017, which is herebyincorporated by reference in its entirety.

TECHNICAL FIELD

This disclosure relates to video encoding and video decoding.

BACKGROUND

Digital video capabilities can be incorporated into a wide range ofdevices, including digital televisions, digital direct broadcastsystems, wireless broadcast systems, personal digital assistants (PDAs),laptop or desktop computers, tablet computers, e-book readers, digitalcameras, digital recording devices, digital media players, video gamingdevices, video game consoles, cellular or satellite radio telephones,so-called “smart phones,” video teleconferencing devices, videostreaming devices, and the like. Digital video devices implement videocompression techniques, such as those described in the standards definedby MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4, Part 10, AdvancedVideo Coding (AVC), the recently finalized High Efficiency Video Coding(HEVC) standard, and extensions of such standards. The video devices maytransmit, receive, encode, decode, and/or store digital videoinformation more efficiently by implementing such video compressiontechniques.

Video compression techniques perform spatial (intra-picture) predictionand/or temporal (inter-picture) prediction to reduce or removeredundancy inherent in video sequences. For block-based video coding, avideo slice (i.e., a video frame or a portion of a video frame) may bepartitioned into video blocks, which may also be referred to astreeblocks, coding units (CUs) and/or coding nodes. Video blocks in anintra-coded (I) slice of a picture are encoded using spatial predictionwith respect to reference samples in neighboring blocks in the samepicture. Video blocks in an inter-coded (P or B) slice of a picture mayuse spatial prediction with respect to reference samples in neighboringblocks in the same picture or temporal prediction with respect toreference samples in other reference pictures. Pictures may be referredto as frames, and reference pictures may be referred to a referenceframes.

Spatial or temporal prediction results in a predictive block for a blockto be coded. Residual data represents pixel differences between theoriginal block to be coded and the predictive block. An inter-codedblock is encoded according to a motion vector that points to a block ofreference samples forming the predictive block, and the residual dataindicating the difference between the coded block and the predictiveblock. An intra-coded block is encoded according to an intra-coding modeand the residual data. For further compression, the residual data may betransformed from the pixel domain to a transform domain, resulting inresidual transform coefficients, which then may be quantized. Thequantized transform coefficients, initially arranged in atwo-dimensional array, may be scanned in order to produce aone-dimensional vector of transform coefficients, and entropy coding maybe applied to achieve even more compression.

SUMMARY

In general, this disclosure describes techniques related to decoder-sidemotion vector derivation (DMVD), including techniques for derivingmotion information (e.g., one or more motion vectors, a precision, andone or more reference picture indexes) used to encode blocks of videodata and for determining by a video decoder the same motion informationas that selected by the video encoder. Using the same (or reciprocal)derivation techniques used by the video encoder, a video decoder maydetermine, without receiving any syntax elements specificallyidentifying the motion information, what motion information was used toencode the video data.

In one example, a method includes determining a block of video data iscoded in an inter prediction mode; implicitly determining that adecoder-side motion vector derivation (DMVD) mode is enabled for theblock of video data; determining motion information for the block ofvideo data; using the motion information, determining a reference blockin accordance with the DMVD mode; and generating a predictive block forthe block of video data based on the reference block.

In another example, a device for decoding video data includes a memoryconfigured to store the video data and one or more processors configuredto determine a block of video data is coded in an inter prediction mode;implicitly determine that a decoder-side motion vector derivation (DMVD)mode is enabled for the block of video data; determine motioninformation for the block of video data; use the motion information,determining a reference block in accordance with the DMVD mode; andgenerate a predictive block for the block of video data based on thereference block.

In another example, a computer-readable storage medium storinginstructions that when executed by one or more processors cause the oneor more processors to determine a block of video data is coded in aninter prediction mode; implicitly determine that a decoder-side motionvector derivation (DMVD) mode is enabled for the block of video data;determine motion information for the block of video data; use the motioninformation, determining a reference block in accordance with the DMVDmode; and generate a predictive block for the block of video data basedon the reference block.

In another example, an apparatus for decoding video data includes meansfor determining a block of video data is coded in an inter predictionmode; means for implicitly determining that a decoder-side motion vectorderivation (DMVD) mode is enabled for the block of video data; means fordetermining motion information for the block of video data; means forusing the motion information, determining a reference block inaccordance with the DMVD mode; and means for generating a predictiveblock for the block of video data based on the reference block.

The details of one or more examples of the disclosure are set forth inthe accompanying drawings and the description below. Other features,objects, and advantages will be apparent from the description, drawings,and claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system that may utilize the techniques of this disclosure forsupporting decoder-side motion vector derivation.

FIG. 2A is a conceptual diagram showing an example of spatialneighboring motion vector candidates for merge mode.

FIG. 2B is a conceptual diagram showing an example of spatialneighboring motion vector candidates for an advanced motion vectorprediction mode.

FIG. 3A is a conceptual diagram showing an example of a temporal motionvector predictor candidate.

FIG. 3B is a conceptual timing diagram showing an example of motionvector scaling.

FIG. 4 is a conceptual diagram showing an example of bilateral matching.

FIG. 5 is a conceptual diagram showing an example of template matching.

FIGS. 6A and 6B are flow diagrams showing example proposed modificationsto frame-rate up conversion template matching mode.

FIG. 7 is a conceptual diagram showing an example of optical flowtrajectory.

FIG. 8 is a conceptual diagram showing an example of bi-directionaloptical flow for an 8×4 block.

FIG. 9 is a conceptual diagram showing an example of proposeddecoder-side motion vector derivation based on bilateral templatematching.

FIGS. 10A and 10B are conceptual diagrams showing an exampleillustration of sub-blocks where overlapped block motion compensationmay apply.

FIGS. 11A-11D are conceptual diagrams showing examples of overlappedblock motion compensation weightings.

FIG. 12 is a block diagram illustrating an example of a video encoderthat may implement techniques supporting decoder-side motion vectorderivation.

FIG. 13 is a block diagram illustrating an example of a video decoder,which decodes an encoded video sequence and performs decoder-side motionvector derivation.

FIG. 14 is a flowchart illustrating an example method of decoding videodata in accordance with techniques described in this disclosure.

DETAILED DESCRIPTION

This disclosure describes techniques related to decoder-side motionvector derivation (DMVD). The techniques of this disclosure may be usedin conjunction with existing video codecs, such as the High EfficiencyVideo Coding (HEVC) standard, or may be used as an efficient coding toolin any future video coding standards.

In general, this disclosure describes techniques for deriving motioninformation (e.g., one or more motion vectors, a precision, and one ormore reference picture indexes) used to encode blocks of video data andfor determining by a video decoder the same motion information as thatselected by the video encoder. Using the same (or reciprocal) derivationtechniques used by the video encoder, a video decoder may determine,without receiving any syntax elements specifically identifying themotion information, what motion information was used to encode the videodata. In some coding scenarios, however, the video encoder may stillexplicitly encode some of the motion information used to encode theblock.

Various techniques in this disclosure may be described with reference toa video coder, which is intended to be a generic term that can refer toeither a video encoder or a video decoder. Unless explicitly statedotherwise, it should not be assumed that techniques described withrespect to a video encoder or a video decoder cannot be performed by theother of a video encoder or a video decoder. For example, in manyinstances, a video decoder performs the same, or sometimes a reciprocal,coding technique as a video encoder in order to decode encoded videodata. In many instances, a video encoder also includes a video decodingloop, and thus the video encoder performs video decoding as part ofencoding video data. Thus, unless stated otherwise, the techniquesdescribed in this disclosure with respect to a video decoder may also beperformed by a video encoder, and vice versa.

This disclosure may also use terms such as current layer, current block,current picture, current slice, etc. In the context of this disclosure,the term current is intended to identify a layer, block, picture, slice,etc. that is currently being coded, as opposed to, for example,previously coded layers, blocks, pictures, and slices or yet to be codedblocks, pictures, and slices.

FIG. 1 is a block diagram illustrating an example video encoding anddecoding system 10 that may utilize the techniques described in thisdisclosure. As shown in FIG. 1, system 10 includes a source device 12that generates encoded video data to be decoded at a later time by adestination device 14. Source device 12 and destination device 14 maycomprise any of a wide range of devices, including desktop computers,notebook (i.e., laptop) computers, tablet computers, set-top boxes,telephone handsets such as so-called “smart” phones, so-called “smart”pads, televisions, cameras, display devices, digital media players,video gaming consoles, video streaming device, or the like. In somecases, source device 12 and destination device 14 may be equipped forwireless communication.

Destination device 14 may receive the encoded video data to be decodedvia a link 16. Link 16 may comprise any type of medium or device capableof moving the encoded video data from source device 12 to destinationdevice 14. In one example, link 16 may comprise a communication mediumto enable source device 12 to transmit encoded video data directly todestination device 14 in real-time. The encoded video data may bemodulated according to a communication standard, such as a wirelesscommunication protocol, and transmitted to destination device 14. Thecommunication medium may comprise any wireless or wired communicationmedium, such as a radio frequency (RF) spectrum or one or more physicaltransmission lines. The communication medium may form part of apacket-based network, such as a local area network, a wide-area network,or a global network such as the Internet. The communication medium mayinclude routers, switches, base stations, or any other equipment thatmay be useful to facilitate communication from source device 12 todestination device 14.

In another example, encoded data may be output from output interface 22to a storage device 26. Similarly, encoded data may be accessed fromstorage device 26 by input interface. Storage device 26 may include anyof a variety of distributed or locally accessed data storage media suchas a hard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile ornon-volatile memory, or any other suitable digital storage media forstoring encoded video data. In a further example, storage device 26 maycorrespond to a file server or another intermediate storage device thatmay hold the encoded video generated by source device 12. Destinationdevice 14 may access stored video data from storage device 26 viastreaming or download. The file server may be any type of server capableof storing encoded video data and transmitting that encoded video datato the destination device 14. Example file servers include a web server(e.g., for a website), an FTP server, network attached storage (NAS)devices, or a local disk drive. Destination device 14 may access theencoded video data through any standard data connection, including anInternet connection. This may include a wireless channel (e.g., a Wi-Ficonnection), a wired connection (e.g., DSL, cable modem, etc.), or acombination of both that is suitable for accessing encoded video datastored on a file server. The transmission of encoded video data fromstorage device 26 may be a streaming transmission, a downloadtransmission, or a combination of both.

The techniques of this disclosure are not necessarily limited towireless applications or settings. The techniques may be applied tovideo coding in support of any of a variety of multimedia applications,such as over-the-air television broadcasts, cable televisiontransmissions, satellite television transmissions, streaming videotransmissions, e.g., via the Internet, encoding of digital video forstorage on a data storage medium, decoding of digital video stored on adata storage medium, or other applications. In some examples, system 10may be configured to support one-way or two-way video transmission tosupport applications such as video streaming, video playback, videobroadcasting, and/or video telephony.

In the example of FIG. 1, source device 12 includes a video source 18,video encoder 20 and an output interface 22. In some cases, outputinterface 22 may include a modulator/demodulator (modem) and/or atransmitter. In source device 12, video source 18 may include a sourcesuch as a video capture device, e.g., a video camera, a video archivecontaining previously captured video, a video feed interface to receivevideo from a video content provider, and/or a computer graphics systemfor generating computer graphics data as the source video, or acombination of such sources. As one example, if video source 18 is avideo camera, source device 12 and destination device 14 may formso-called camera phones or video phones. However, the techniquesdescribed in this disclosure may be applicable to video coding ingeneral, and may be applied to wireless and/or wired applications.

The captured, pre-captured, or computer-generated video may be encodedby video encoder 20. The encoded video data may be transmitted directlyto destination device 14 via output interface 22 of source device 12.The encoded video data may also (or alternatively) be stored ontostorage device 26 for later access by destination device 14 or otherdevices, for decoding and/or playback.

Destination device 14 includes an input interface 28, a video decoder30, and a display device 32. In some cases, input interface 28 mayinclude a receiver and/or a modem. Input interface 28 of destinationdevice 14 receives the encoded video data over link 16. The encodedvideo data communicated over link 16, or provided on storage device 26,may include a variety of syntax elements generated by video encoder 20for use by a video decoder, such as video decoder 30, in decoding thevideo data. Such syntax elements may be included with the encoded videodata transmitted on a communication medium, stored on a storage medium,or stored a file server.

Display device 32 may be integrated with, or external to, destinationdevice 14. In some examples, destination device 14 may include anintegrated display device and also be configured to interface with anexternal display device. In other examples, destination device 14 may bea display device. In general, display device 32 displays the decodedvideo data to a user, and may comprise any of a variety of displaydevices such as a liquid crystal display (LCD), a plasma display, anorganic light emitting diode (OLED) display, or another type of displaydevice.

Video encoder 20 and video decoder 30 may operate according to a videocompression standard, such as HEVC standard, and may conform to the HEVCTest Model (HM). Video encoder 20 and video decoder 30 may additionallyoperate according to an HEVC extension, such as the range extension, themultiview extension (MV-HEVC), or the scalable extension (SHVC) whichhave been developed by the Joint Collaboration Team on Video Coding(JCT-VC) as well as Joint Collaboration Team on 3D Video CodingExtension Development (JCT-3V) of ITU-T Video Coding Experts Group(VCEG) and ISO/IEC Motion Picture Experts Group (MPEG).

Video encoder 20 and video decoder 30 may also operate according toother proprietary or industry standards, such as the ITU-T H.264standard, alternatively referred to as ISO/IEC MPEG-4, Part 10, AdvancedVideo Coding (AVC), or extensions of such standards, such as theScalable Video Coding (SVC) and Multi-view Video Coding (MVC)extensions. The techniques of this disclosure, however, are not limitedto any particular coding standard. Other examples of video compressionstandards include ITU-T H.261, ISO/IEC MPEG-1 Visual, ITU-T H.262 orISO/IEC MPEG-2 Visual, ITU-T H.263, and ISO/IEC MPEG-4 Visual.

ITU-T VCEG (Q6/16) and ISO/IEC MPEG (JTC 1/SC 29/WG 11) are now studyingthe potential need for standardization of future video coding technologywith a compression capability that significantly exceeds that of thecurrent HEVC standard (including its current extensions and near-termextensions for screen content coding and high-dynamic-range coding). Thegroups are working together on this exploration activity in a jointcollaboration effort known as the Joint Video Exploration Team (JVET) toevaluate compression technology designs proposed by their experts inthis area. The JVET first met during 19-21 Oct. 2015. And the latestversion of reference software, i.e., Joint Exploration Model 5 (JEM 5)could be downloaded from:https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/tags/HM-16.6-JEM-5.0/.Algorithm description of Joint Exploration Test Model 5 (JEM5) may bereferred to as JVET-E1001.

Techniques of this disclosure may utilize HEVC terminology for ease ofexplanation. It should not be assumed, however, that the techniques ofthis disclosure are limited to HEVC, and in fact, it is explicitlycontemplated that the techniques of this disclosure may be implementedin successor standards to HEVC and its extensions. Video encoder 20 andvideo decoder 30 may encode and decode video data according to multiplestandards.

Although not shown in FIG. 1, in some aspects, video encoder 20 andvideo decoder 30 may each be integrated with an audio encoder anddecoder, and may include appropriate MUX-DEMUX units, or other hardwareand software, to handle encoding of both audio and video in a commondata stream or separate data streams. If applicable, in some examples,MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol, orother protocols such as the user datagram protocol (UDP).

Video encoder 20 and video decoder 30 each may be implemented as any ofa variety of suitable encoder circuitry or decoder circuitry, such asone or more microprocessors, digital signal processors (DSPs),application specific integrated circuits (ASICs), field programmablegate arrays (FPGAs), discrete logic, software, hardware, firmware or anycombinations thereof. When the techniques are implemented partially insoftware, a device may store instructions for the software in asuitable, non-transitory computer-readable medium and execute theinstructions in hardware using one or more processors to perform thetechniques of this disclosure. Each of video encoder 20 and videodecoder 30 may be included in one or more encoders or decoders, eitherof which may be integrated as part of a combined encoder/decoder (CODEC)in a respective device.

In HEVC and other video coding specifications, a video sequencetypically includes a series of pictures. Pictures may also be referredto as “frames.” In one example approach, a picture may include threesample arrays, denoted SL, Scb, and Scr. In such an example approach, SLis a two-dimensional array (i.e., a block) of luma samples. Scb is atwo-dimensional array of Cb chrominance samples. Scr is atwo-dimensional array of Cr chrominance samples. Chrominance samples mayalso be referred to herein as “chroma” samples. In other instances, apicture may be monochrome and may only include an array of luma samples.

To generate an encoded representation of a picture, video encoder 20 maygenerate a set of coding tree units (CTUs). Each of the CTUs maycomprise a coding tree block of luma samples, two corresponding codingtree blocks of chroma samples, and syntax structures used to code thesamples of the coding tree blocks. In monochrome pictures or pictureshaving three separate color planes, a CTU may comprise a single codingtree block and syntax structures used to code the samples of the codingtree block. A coding tree block may be an N×N block of samples. A CTUmay also be referred to as a “tree block” or a “largest coding unit”(LCU). The CTUs of HEVC may be broadly analogous to the macroblocks ofother standards, such as H.264/AVC. However, a CTU is not necessarilylimited to a particular size and may include one or more coding units(CUs). A slice may include an integer number of CTUs orderedconsecutively in a raster scan order.

To generate a coded CTU, video encoder 20 may recursively performquad-tree partitioning on the coding tree blocks of a CTU to divide thecoding tree blocks into coding blocks, hence the name “coding treeunits.” A coding block may be an N×N block of samples. A CU may comprisea coding block of luma samples and two corresponding coding blocks ofchroma samples of a picture that has a luma sample array, a Cb samplearray, and a Cr sample array, and syntax structures used to code thesamples of the coding blocks. In monochrome pictures or pictures havingthree separate color planes, a CU may comprise a single coding block andsyntax structures used to code the samples of the coding block.

Video encoder 20 may partition a coding block of a CU into one or moreprediction blocks. A prediction block is a rectangular (i.e., square ornon-square) block of samples on which the same prediction is applied. Aprediction unit (PU) of a CU may comprise a prediction block of lumasamples, two corresponding prediction blocks of chroma samples, andsyntax structures used to predict the prediction blocks. In monochromepictures or pictures having three separate color planes, a PU maycomprise a single prediction block and syntax structures used to predictthe prediction block. Video encoder 20 may generate predictive luma, Cb,and Cr blocks for luma, Cb, and Cr prediction blocks of each PU of theCU.

Video encoder 20 may use intra prediction or inter prediction togenerate the predictive blocks for a PU. If video encoder 20 uses intraprediction to generate the predictive blocks of a PU, video encoder 20may generate the predictive blocks of the PU based on decoded samples ofthe picture associated with the PU. If video encoder 20 uses interprediction to generate the predictive blocks of a PU, video encoder 20may generate the predictive blocks of the PU based on decoded samples ofone or more pictures other than the picture associated with the PU.

After video encoder 20 generates predictive luma, Cb, and Cr blocks forone or more PUs of a CU, video encoder 20 may generate a luma residualblock for the CU. Each sample in the CU's luma residual block indicatesa difference between a luma sample in one of the CU's predictive lumablocks and a corresponding sample in the CU's original luma codingblock. In addition, video encoder 20 may generate a Cb residual blockfor the CU. Each sample in the CU's Cb residual block may indicate adifference between a Cb sample in one of the CU's predictive Cb blocksand a corresponding sample in the CU's original Cb coding block. Videoencoder 20 may also generate a Cr residual block for the CU. Each samplein the CU's Cr residual block may indicate a difference between a Crsample in one of the CU's predictive Cr blocks and a correspondingsample in the CU's original Cr coding block.

Furthermore, video encoder 20 may use quad-tree partitioning todecompose the luma, Cb, and Cr residual blocks of a CU into one or moreluma, Cb, and Cr transform blocks. A transform block is a rectangular(e.g., square or non-square) block of samples on which the sametransform is applied. A transform unit (TU) of a CU may comprise atransform block of luma samples, two corresponding transform blocks ofchroma samples, and syntax structures used to transform the transformblock samples. Thus, each TU of a CU may be associated with a lumatransform block, a Cb transform block, and a Cr transform block. Theluma transform block associated with the TU may be a sub-block of theCU's luma residual block. The Cb transform block may be a sub-block ofthe CU's Cb residual block. The Cr transform block may be a sub-block ofthe CU's Cr residual block. In monochrome pictures or pictures havingthree separate color planes, a TU may comprise a single transform blockand syntax structures used to transform the samples of the transformblock.

Video encoder 20 may apply one or more transforms to a luma transformblock of a TU to generate a luma coefficient block for the TU. Acoefficient block may be a two-dimensional array of transformcoefficients. A transform coefficient may be a scalar quantity. Videoencoder 20 may apply one or more transforms to a Cb transform block of aTU to generate a Cb coefficient block for the TU. Video encoder 20 mayapply one or more transforms to a Cr transform block of a TU to generatea Cr coefficient block for the TU.

After generating a coefficient block (e.g., a luma coefficient block, aCb coefficient block or a Cr coefficient block), video encoder 20 mayquantize the coefficient block. Quantization generally refers to aprocess in which transform coefficients are quantized to possibly reducethe amount of data used to represent the transform coefficients,providing further compression. After video encoder 20 quantizes acoefficient block, video encoder 20 may entropy encode syntax elementsindicating the quantized transform coefficients. For example, videoencoder 20 may perform Context-Adaptive Binary Arithmetic Coding (CABAC)on the syntax elements indicating the quantized transform coefficients.

Video encoder 20 may output a bitstream that includes a sequence of bitsthat forms a representation of coded pictures and associated data. Thebitstream may comprise a sequence of Network Abstraction Layer (NAL)units. A NAL unit is a syntax structure containing an indication of thetype of data in the NAL unit and bytes containing that data in the formof a raw byte sequence payload (RB SP) interspersed as necessary withemulation prevention bits. Each of the NAL units includes a NAL unitheader and encapsulates a RBSP. The NAL unit header may include a syntaxelement that indicates a NAL unit type code. The NAL unit type codespecified by the NAL unit header of a NAL unit indicates the type of theNAL unit. A RBSP may be a syntax structure containing an integer numberof bytes that is encapsulated within a NAL unit. In some instances, anRB SP includes zero bits.

Different types of NAL units may encapsulate different types of RBSPs.For example, a first type of NAL unit may encapsulate an RBSP for a PPS,a second type of NAL unit may encapsulate an RBSP for a coded slice, athird type of NAL unit may encapsulate an RBSP for SEI messages, and soon. NAL units that encapsulate RBSPs for video coding data (as opposedto RBSPs for parameter sets and SEI messages) may be referred to as VCLNAL units.

Video decoder 30 may receive a bitstream generated by video encoder 20.In addition, video decoder 30 may parse the bitstream to obtain syntaxelements from the bitstream. Video decoder 30 may reconstruct thepictures of the video data based at least in part on the syntax elementsobtained from the bitstream. The process to reconstruct the video datamay be generally reciprocal to the process performed by video encoder20. In addition, video decoder 30 may inverse quantize coefficientblocks associated with TUs of a current CU. Video decoder 30 may performinverse transforms on the coefficient blocks to reconstruct transformblocks associated with the TUs of the current CU. Video decoder 30 mayreconstruct the coding blocks of the current CU by adding the samples ofthe predictive blocks for PUs of the current CU to corresponding samplesof the transform blocks of the TUs of the current CU. By reconstructingthe coding blocks for each CU of a picture, video decoder 30 mayreconstruct the picture.

In HEVC, the largest coding unit in a slice is called a coding treeblock (CTB) or coding tree unit (CTU). A CTB contains a quad-tree, thenodes of which are coding units. The size of a CTB can range from 16×16to 64×64 in the HEVC main profile (although technically 8×8 CTB sizescan be supported). A CU may be as large as a CTB or as small as 8×8 or asize in between the two. Each CU is typically coded using one codingmode. When a CU is inter coded, the inter coded CU may be furtherpartitioned into 2 or 4 PUs or have just one PU when furtherpartitioning does not apply. When two PUs are present in one CU, the twoPUs can be half size rectangles or two rectangle size with ¼ or ¾ sizeof the CU. When the CU is inter coded, one set of motion information ispresent for each PU. In addition, each PU is coded with a uniqueinter-prediction mode to derive the set of motion information.

In order to reduce the bit rate needed to transmit motion information(e.g., motion vectors, reference indexes, and/or motion vectorprecision), video coding standards typically use different types ofmotion vector prediction. In the HEVC standard, for example, there aretwo inter prediction modes, named merge mode (with skip mode beingconsidered a special case of merge mode) and advanced motion vectorprediction (AMVP) mode respectively for a PU.

In either AMVP or merge mode, video decoder 30 maintains a motion vector(MV) candidate list for multiple motion vector predictors. Video decoder30 generates the motion vector(s), as well as reference indices in themerge mode, of the current PU by taking one candidate from the MVcandidate list. Both video encoder 20 and video decoder 30 generate thesame candidate lists. This disclosure will describe motion vectorprediction from the perspective of video decoder 30, but it should beunderstood that video encoder 20 generally implements the sametechniques.

In the base HEVC standard, the MV candidate list contains up to fivecandidates for the merge mode and only two candidates for the AMVP mode,although other standards may use different numbers of candidates. Amerge candidate may contain a set of motion information, e.g., motionvectors corresponding to one or both reference picture lists (list 0 andlist 1) and the reference indices. If a merge candidate is identified bya merge index, then video decoder 30 uses the motion vectors andreference picture indices of the identified merge candidate for theprediction of the current block. However, under AMVP mode for eachpotential prediction direction from either list 0 or list 1, a referenceindex needs to be explicitly signaled, together with an MV predictor(MVP) index to the MV candidate list since the AMVP candidate containsonly a motion vector. In AMVP mode, the predicted motion vectors can befurther refined.

As can be seen above, a merge candidate corresponds to a full set ofmotion information while an AMVP candidate contains just one motionvector for a specific prediction direction and for a reference index.The candidates for both modes may be derived similarly from the samespatial and temporal neighboring blocks.

FIG. 2A is a conceptual diagram showing an example of spatialneighboring motion vector candidates for merge mode. Video decoder 30may generate a candidate list by adding the motion information ofspatial neighboring candidates to the candidate list. Spatial MVcandidates are derived from the neighboring blocks shown in FIGS. 2A and2B, for a specific PU (PU₀), although the methods generating thecandidates from the blocks differ for merge and AMVP modes. In mergemode, up to four spatial MV candidates can be derived with the ordersshown in FIG. 2A with numbers, and the order is the following: left (0,A1), above (1, B1), above right (2, B0), below left (3, A0), and aboveleft (4, B2), as shown in FIG. 2A.

FIG. 2B is a conceptual diagram showing an example of spatialneighboring motion vector candidates for an advanced motion vectorprediction mode. In AVMP mode, the neighboring blocks are divided intotwo groups: left group consisting of the block 0 and 1, and above groupconsisting of the blocks 2, 3, and 4 as shown in FIG. 2B. For eachgroup, the potential candidate in a neighboring block referring to thesame reference picture as that indicated by the signaled reference indexhas the highest priority to be chosen to form a final candidate of thegroup. It is possible that all neighboring blocks do not contain amotion vector pointing to the same reference picture. Therefore, if sucha candidate cannot be found, then video decoder 30 may scale the firstavailable candidate to form the final candidate, thus the temporaldistance differences can be compensated.

Video encoder 20 and video decoder 30 may perform temporal motion vectorprediction (TMVP) as in the HEVC standard. Video decoder 30 may add aTMVP candidate, if enabled and available, into the MV candidate listafter spatial motion vector candidates. The process of motion vectorderivation for TMVP candidate is the same for both merge and AMVP modes;however, in HEVC, the target reference index for the TMVP candidate inthe merge mode is always set to 0.

FIG. 3A is a conceptual diagram showing an example of a temporal motionvector predictor candidate. The primary block location for TMVPcandidate derivation is the bottom right block outside of the collocatedPU as shown in FIG. 3A as a block “T”, to compensate the bias to theabove and left blocks used to generate spatial neighboring candidates.However, if that block is located outside of the current CTB row ormotion information is not available, the block is substituted with acenter block of the PU.

Video decoder 30 may derive a motion vector for the TMVP candidate fromthe co-located PU of the co-located picture, indicated in the slicelevel. The motion vector for the co-located PU is called collocated MV.A block in a reference picture may, for example, be considered to beco-located to a block in a current picture if the block in the referencepicture and the current block each include at least one pixelcorresponding to a same relative position in the reference picture andthe current picture.

FIG. 3B is a conceptual timing diagram showing an example of motionvector scaling. Similar to temporal direct mode in AVC, to derive theTMVP candidate motion vector, video decoder 30 may scale the co-locatedMV to compensate for the temporal distance differences, as shown in FIG.3B. With motion vector scaling, it is generally assumed that the valueof motion vectors is proportional to the distance of pictures in thepresentation time. A motion vector associates two pictures, thereference picture, and the picture containing the motion vector (namelythe containing picture). When a motion vector is utilized to predict theother motion vector, the distance of the containing picture and thereference picture is calculated based on the Picture Order Count (POC)values.

When a motion vector is being predicted, its reference picture and thereference picture of the motion vector predictor may be different.Therefore, a new distance (based on POC) is calculated. And the motionvector is scaled based on these two POC distances. In HEVC, motionvector scaling applies to both TMVP and AMVP for spatial and temporalneighboring candidates.

With respect to artificial motion vector candidate generation, if amotion vector candidate list is not complete, then video decoder 30 maygenerate artificial motion vector candidates insert that artificialmotion vector candidates at the end of the list until the list is fullor until options for artificial candidates are exhausted.

In merge mode, there are two types of artificial MV candidates: combinedcandidate derived only for B-slices and zero candidates used only if thefirst type does not provide enough artificial candidates.

For each pair of candidates that are already in the candidate list andhave necessary motion information, video decoder 30 may derivebi-directional combined motion vector candidates by a combination of themotion vector of the first candidate referring to a picture in the list0 and the motion vector of a second candidate referring to a picture inthe list 1.

With respect to the pruning process for candidate insertion, candidatesfrom different blocks may happen to be the same, which decreases theefficiency of a merge/AMVP candidate list due to candidate duplicationin the list. To help reduce this inefficiency, video decoder 30 mayapply a pruning process. As part of the pruning process, video decoder30 compares one candidate against the others in the current candidatelist to avoid inserting identical candidate in certain extent. To reducethe complexity, only a limited number of pruning processes may beapplied instead of comparing each potential candidates with all theother existing candidates.

The JEM reference software includes several inter coding tools thatutilize DMVD to derive or refine the motion vector for a current block.One such DMVD tool is pattern matched motion vector derivation (PMMVD)mode, which is a special merge mode based on Frame-Rate Up Conversion(FRUC) techniques. When implementing the JEM reference software, inPMMVD mode, video decoder 30 may derive motion information for a blockrather than receive explicit signaling.

Video decoder 30 may receive A FRUC flag for a CU when a merge flag forthe CU is true. When the FRUC flag is false, then video decoder 30 mayreceive a merge index and use the regular merge mode. When the FRUC flagis true, video decoder 30 may receive an additional FRUC mode flag toindicate which method (e.g., bilateral matching or template matching) isto be used to derive motion information for the block. The syntax tableto code flags for FRUC is as follows:

fruc_flag u(1) if(fruc_flag){ if(slice_type != P_slice){ fruc_mode u(1)} }

During the motion derivation process, video decoder 30 may first derivean initial motion vector for the whole CU based on bilateral matching ortemplate matching. First, the merge list of the CU, or called PMMVDseeds, is checked and the candidate which leads to the minimum matchingcost is selected as the starting point. Then a local search based onbilateral matching or template matching around the starting point isperformed and the MV results in the minimum matching cost is taken asthe MV for the whole CU. Subsequently, the motion information is furtherrefined at sub-block level with the derived CU motion vectors as thestarting points.

FIG. 4 is a conceptual diagram showing an example of bilateral matching.As shown in the FIG. 4, bilateral matching is used to derive motioninformation of the current block (Cur) by finding the best match betweentwo reference blocks (R₀ and R₁) along the motion trajectory of thecurrent block in two different reference pictures (Ref0 and Ref1). Themotion trajectory may include the path that a pixel in a block followsthrough space and time when considering an image sequence (e.g.,reference frames and the current frame) as a 3-dimensional continuousspatio-temporal field. Under the assumption of continuous motiontrajectory, the motion vectors MV0 and MV1 pointing to the two referenceblocks (R₀ and R₁) are proportional to the temporal distances betweenthe current picture (Cur) and the two reference pictures (Ref0 andRef1). Derived MVs 100 and 102 are derived using bilateral matching andpoint to reference blocks R′₀ and R′₁ respectively. As a special case,when the current picture (Cur) is temporally between the two referencepictures (Ref0 and Ref1) and the temporal distance from the currentpicture to the two reference pictures is the same, the bilateralmatching becomes mirror based bi-directional MV. Consequentially,derived motion vectors 100 and 102 similarly are mirrored.

FIG. 5 is a conceptual diagram showing an example of template matching.As shown in FIG. 5, template matching is used to derive motioninformation of the current block (Cur) by finding the best match betweena template (top and/or left neighboring blocks of the current block) inthe current picture and a block (same size to the template) in areference picture (Ref0 and Ref1). A template may include neighboringpixels of a block that is used to compare a block of interest (Cur) withcandidate references (R₀ with MV0 and R₁ with MV1) or derived references(R′₀ with MV 110 and R′₁ with MV 112) by searching neighboring blocks ofR₀ and R₁. The most similar reference is then used as the prediction.

At video encoder 20, the decision on whether using FRUC merge mode for aCU is based on RD cost selection as done for normal merge candidate.That is the two matching modes (bilateral matching and templatematching) are both checked for a CU by using RD cost selection. The oneleading to the minimal cost is further compared to other CU modes. If aFRUC matching mode is the most efficient one, FRUC flag is set to truefor the CU and the related matching mode is used.

In the 5th WET meeting, “Enhanced Template Matching in FRUC Mode,”WET-E0035, available at http://phenix.it-sudparis.eu/jvet/, was proposedto further improve FRUC Template matching. A flowchart of an exemplaryFRUC template matching mode is shown in FIG. 6A. In the first step, atemplate T₀ (and its corresponding motion information MV0) is found tomatch current template Tc of current block from list0 referencepictures. In the second step, template T₁ (and its corresponding motioninformation MV1) is found from list1 reference pictures. The obtainedmotion information MV0 and MV1 are used to perform bi-prediction togenerate predictor of the current block.

FIGS. 6A and 6B are flow diagrams showing example proposed modificationsto frame-rate up conversion template matching mode. FRUC templatematching mode may be enhanced by introducing bi-directional templatematching and adaptive selection between uni-prediction andbi-prediction. Exemplary modifications relative to FIG. 6A areunderlined in FIG. 6B.

Bi-directional template matching may be implemented based onuni-directional template matching. As shown in FIG. 6A, a matchedtemplate T₀ is first found in the first step of template matching fromList0 reference pictures (120). Note that List0 here is only taken as anexample. In fact, whether List0 or List1 used in the first step isadaptive to initial distortion cost between current template and initialtemplate in corresponding reference picture. The initial template can bedetermined with initial motion information of the current block which isavailable before performing the first template matching. The referencepicture list corresponding to minimal initial template distortion costwill be used in the first step of template matching. For example, ifinitial template distortion cost corresponding to list0 is no largerthan cost corresponding to List1, List0 is used in the first step oftemplate matching and List1 is used in the second step), then, thecurrent template T_(C) of current block is updated as follows:T′ _(C)=2*T _(C) −T ₀

The updated current template T′_(C), instead of the current templateT_(C), is used to find another matched template T₁ from List1 referencepictures in the second template matching (122). As a result, the matchedtemplate T₁ is found by jointly using List0 and List1 reference pictures(124). This matching process is called bi-directional template matching.

The selection between uni-prediction and bi-prediction for motioncompensation prediction (MCP) may be based on template matchingdistortion. As shown in FIG. 6B, during template matching, distortionbetween template T₀ and Tc (the current template) can be calculated ascost0 (130), the current template may be updated (132), and distortionbetween template T₁ and T′_(C) (the updated current template) can becalculated as cost1 (134). If cost0 is less than 0.5*cost1 (136),uni-prediction based on MV0 may be applied to FRUC template matchingmode (138); otherwise, bi-prediction based on MV0 and MV1 is applied(140). Note that cost0 is compared to 0.5*cost1 since cost1 indicates adifference between template T₁ and T′_(C) (the updated currenttemplate), which is 2 times of difference between T_(C) (the currenttemplate) and its prediction of 0.5*(T₀+T₁). It is noted that MCP may beapplied to PU-level motion refinement. Sub-PU level motion refinementmay be kept unchanged.

FIG. 7 is a conceptual diagram showing an example of optical flowtrajectory. JEM also include a coding mode referred to as Bi-directionaloptical flow (BIO). BIO is pixel-wise motion refinement which isperformed on top of block-wise motion compensation in a case ofbi-prediction. As BIO compensates the fine motion can inside the blockenabling BIO results in enlarging block size for motion compensation.Sample-level motion refinement may not require exhaustive search orsignaling as an explicit equation can gives fine motion vector for eachsample.

Let I^((k)) be luminance value from reference k (k=0, 1) aftercompensation block motion, and ∂I^((k))/∂x, ∂I^((k))/∂y are horizontaland vertical components of the I^((k)) gradient respectively. Assumingthe optical flow is valid, the motion vector field (v_(x),v_(y)) isgiven by an equation∂I ^((k)) /∂t+v _(x) ∂I ^((k)) /∂x+v _(y) ∂I ^((k)) /∂y=0.  (1)

Combining optical flow equation with Hermite interpolation for motiontrajectory of each sample one gets a unique polynomial of third orderwhich matches both function values I^((k)) and derivatives ∂I^((k))/∂x,∂I^((k))/∂y at the ends. The value of this polynomial at t=0 is BIOprediction:pred_(BIO)=1/2·(I ⁽⁰⁾ +I ⁽¹⁾ +v _(x)/2·(τ₁ ∂I ⁽¹⁾ /∂x−τ _(0∂I) ⁽⁰⁾/∂x)+v _(y)/2·(τ₁ ∂I ⁽¹⁾ /∂y−τ ₀ ∂I ^((k)) /∂y)).  (2)

Here τ₀ and τ₁ denote the distance to reference frames as shown in FIG.7. Distances τ₀ and τ₁ are calculated based on POC for Ref0 and Ref1:

τ₀=POC(current)−POC(Ref0), τ₁=POC(Ref1)−POC(current). If bothpredictions come from the same time direction (both from the past orboth from the future) then signs are different τ₀·τ₁<0. In this case BIOis applied only if prediction come not from the same time moment(τ₀≠τ₁), both referenced regions have non-zero motion (MVx₀, MVy₀, MVx₁,MVy₁≠0) and block motion vectors are proportional to the time distance(MVx₀/MVx₁=MVy₀/MVy₁=−τ₀/τ₁).

The motion vector field (v_(x),v_(y)) is determined by minimizing thedifference Δ between values in points A and B (intersection of motiontrajectory and reference frame planes in FIG. 7). Model uses only firstlinear term of local Taylor expansion for Δ:Δ=(I ⁽⁰⁾ −I ⁽¹⁾ ₀ +v _(x)(τ₁ ∂I ⁽¹⁾ /∂x+τ ₀ ∂I ⁽¹⁾ /∂x)+v _(y)(τ∂I ⁽¹⁾/∂y+τ ₀ ∂I ⁽¹⁾ /∂y))  (3)

All values in (1) depend on sample location (i′, j′), which was omittedso far. Assuming the motion is consistent in local surrounding, then Δinside (2M+1)×(2M+1) square window Ω centered in currently predictedpoint (i,j) is minimized:

$\begin{matrix}{\left( {v_{x},v_{y}} \right) = {\underset{v_{x},v_{y}}{\arg\;\min}{\sum\limits_{{\lbrack{i^{\prime},j}\rbrack} \in \Omega}{\Delta^{2}\left\lbrack {i^{\prime},j^{\prime}} \right\rbrack}}}} & (4)\end{matrix}$

For this optimization problem, a simplified solution making firstminimization in vertical and then in horizontal directions may be used.It results in

$\begin{matrix}{\mspace{79mu}{v_{x} = {{\left( {s_{1} + r} \right) > {{m?\mspace{14mu}{clip}}\; 3\left( {{1 - {thBIO}},{theBIO},{- \frac{s_{3}}{\left( {s_{1} + r} \right)}}} \right)}}:0}}} & (5) \\{\mspace{79mu}{{v_{y} = {{\left( {s_{5} + r} \right) > {{m?\mspace{14mu}{clip}}\; 3\left( {{- {thBIO}},{theBIO},{- \frac{s_{6} - {v_{x}{s_{2}/2}}}{\left( {s_{5} + r} \right)}}} \right)}}:0}}\mspace{20mu}{where}}} & (6) \\{\mspace{79mu}{{{s_{1} = {\sum\limits_{{\lbrack{i^{\prime},j}\rbrack} \in \Omega}\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)^{2}}};}\mspace{20mu}{{s_{3} = {\sum\limits_{{\lbrack{i^{\prime},j}\rbrack} \in \Omega}{\left( {I^{(1)} - I^{(0)}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)}}};}{{s_{2} = {\sum\limits_{{\lbrack{i^{\prime},j}\rbrack} \in \Omega}{\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)}}};}\mspace{20mu}{{s_{5} = {\sum\limits_{{\lbrack{i^{\prime},j}\rbrack} \in \Omega}\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)^{2}}};}\mspace{20mu}{s_{6} = {\sum\limits_{{\lbrack{i^{\prime},j}\rbrack} \in \Omega}{\left( {I^{(1)} - I^{(0)}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)}}}}} & (7)\end{matrix}$

In order to avoid division by zero or very small value, regularizationparameters r and m are introduced in equations (2), (3).r=500·4^(d-8)  (8)m=700·4^(d-8)  (9)Here d is internal bit-depth of the input video.

In some cases, MV regiment of BIO might be unreliable due to noise orirregular motion. Therefore, in BIO, the magnitude of MV regiment isclipped to the certain threshold thBIO. The threshold value isdetermined based on whether all the reference pictures of the currentpicture are all from one direction. If all the reference pictures of thecurrent pictures of the current picture are from one direction, thevalue of the threshold is set to 12×2^(14-d), otherwise, it is set to12×2^(13-d).

Gradients for BIO are calculated at the same time with motioncompensation interpolation using operations consistent with HEVC motioncompensation process (2D separable FIR). The input for this 2D separableFIR is the same reference frame sample as for motion compensationprocess and fractional position (fracX, fracY) according to thefractional part of block motion vector. In case of horizontal gradient∂I/∂x signal first interpolated vertically using BIOfilterScorresponding to the fractional position fracY with de-scaling shiftd−8, then gradient filter BIOfilterG is applied in horizontal directioncorresponding to the fractional position fracX with de-scaling shift by18−d. In case of vertical gradient ∂I/∂y first gradient filter isapplied vertically using BIOfilterG corresponding to the fractionalposition fracY with de-scaling shift d−8, then signal displacement isperformed using BIOfilterS in horizontal direction corresponding to thefractional position fracX with de-scaling shift by 18−d. The length ofinterpolation filter for gradients calculation BIOfilterG and signaldisplacement BIOfilterF is shorter (6-tap) in order to maintainreasonable complexity. Table 1 shows the filters used for gradientscalculation for different fractional positions of block motion vector inBIO. Table 2 shows the interpolation filters used for prediction signalgeneration in BIO.

FIG. 8 is a conceptual diagram showing an example of bi-directionaloptical flow for an 8×4 block. FIG. 8 shows an example of a techniquefor performing a gradient calculation for the 8×4 block. For an 8×4blocks, video decoder 30 needs to fetch the motion compensatedpredictors and calculate the HOR/VER gradients of all the pixels withincurrent block as well as the outer two lines of pixels because solvingvx and vy for each pixel needs the HOR/VER gradient values and motioncompensated predictors of the pixels within the window Ω centered ineach pixel as shown in equation (4). And in JEM, the size of this windowis set to 5×5, it therefore needs to fetch the motion compensatedpredictors and calculate the gradients for the outer two lines ofpixels.

TABLE 1 Filters for gradients calculation in BIO Interpolation filterfor Fractional pel position gradient(BIOfilterG) 0 {8, −39, −3, 46, −17,5} 1/16 {8, −32, −13, 50, −18, 5} ⅛ {7, −27, −20, 54, −19, 5} 3/16 {6,−21, −29, 57, −18, 5} ¼ {4, −17, −36, 60, −15, 4} 5/16 {3, −9, −44, 61,−15, 4} ⅜ {1, −4, −48, 61, −13, 3} 7/16 {0, 1, −54, 60, −9, 2} ½ {1, 4,−57, 57, −4, 1}

TABLE 2 Interpolation filters for prediction signal generation in BIOInterpolation filter for Fractional pel position predictionsignal(BIOfilterS) 0 {0, 0, 64, 0, 0, 0} 1/16 {1, −3, 64, 4, −2, 0} ⅛{1, −6, 62, 9, −3, 1} 3/16 {2, −8, 60, 14, −5, 1} ¼ {2, −9, 57, 19, −7,2} 5/16 {3, −10, 53, 24, −8, 2} ⅜ {3, −11, 50, 29, −9, 2} 7/16 {3, −11,44, 35, −10, 3} ½ {1, −7, 38, 38, −7, 1}

In JEM, BIO is applied to all bi-directional predicted blocks when thetwo predictions are from different reference pictures. When LIC isenabled for a CU, BIO is disabled.

FIG. 9 is a conceptual diagram showing an example of proposeddecoder-side motion vector derivation based on bilateral templatematching. JEM also includes a coding tool referred to as templatematching. Video decoder 30 generates a bilateral template as theweighted combination of the two prediction blocks, from the initial MV0of list0 and MV1 of list1 respectively, as shown in FIG. 9.

The template matching operation consists of calculating cost measuresbetween the generated template and the sample region (around the initialprediction block) in the reference picture. For each of the tworeference pictures, the MV that yields the minimum template cost isconsidered as the updated MV of that list to replace the original one.Finally, the two new MVs, i.e., MV0′ and MV1′ as shown in FIG. 8, areused for regular bi-prediction. As it is commonly used in block-matchingmotion estimation, the sum of absolute differences (SAD) is utilized ascost measure.

The proposed DMVD techniques are applied for merge mode of bi-predictionwith one from the reference picture in the past and the other fromreference picture in the future, without the transmission of additionalsyntax element.

In JEM4.0, when LIC, affine, sub-CU merge candidate or FRUC is selectedfor one CU, the DMVD is not applied

FIGS. 10A and 10B are conceptual diagrams showing an exampleillustration of sub-blocks where overlapped block motion compensation(OBMC) may apply, such as the OBMC included in JEM. OBMC has been usedfor early generations of video standards, e.g., as in H.263. In JEM, theOBMC is performed for all Motion Compensated (MC) block boundariesexcept the right and bottom boundaries of a CU. Moreover, it is appliedfor both luma and chroma components. In JEM, a MC block is correspondingto a coding block. When a CU is coded with sub-CU mode (includes sub-CUmerge, Affine and FRUC mode, as described in Kaiming He, Jian Sun, andXiaoou Tang, “Guided image filtering,” Pattern Analysis and MachineIntelligence, IEEE Transactions on, vol. 35, no. 6, pp. 1397-1409,2013), each sub-block of the CU is a MC block. To process CU boundariesin a uniform fashion, OBMC is performed at sub-block level for all MCblock boundaries, where sub-block size is set equal to 4×4, asillustrated in FIGS. 10A and 10B.

When OBMC applies to the current sub-block, besides current motionvectors, motion vectors of four connected neighboring sub-blocks, ifavailable and are not identical to the current motion vector, are alsoused to derive prediction block for the current sub-block. Thesemultiple prediction blocks based on multiple motion vectors are combinedto generate the final prediction signal of the current sub-block.

FIGS. 11A-11D are conceptual diagrams showing examples of overlappedblock motion compensation weightings. As shown in FIGS. 11A-11D,prediction block based on motion vectors of a neighboring sub-block isdenoted as P_(N), with N indicating an index for the neighboring above,below, left and right sub-blocks and prediction block based on motionvectors of the current sub-block is denoted as P_(C). When P_(N) isbased on the motion information of a neighboring sub-block that containsthe same motion information to the current sub-block, the OBMC is notperformed from P_(N). Otherwise, every pixel of P_(N) is added to thesame pixel in P_(C), i.e., four rows/columns of P_(N) are added toP_(C). The weighting factors {1/4, 1/8, 1/16, 1/32} are used for P_(N)and the weighting factors {3/4, 7/8, 15/16, 31/32} are used for P_(C).The exception are small MC blocks, (i.e., when height or width of thecoding block is equal to 4 or a CU is coded with sub-CU mode), for whichonly two rows/columns of P_(N) are added to P_(C). In this caseweighting factors {1/4, 1/8} are used for P_(N) and weighting factors{3/4, 7/8} are used for P_(C). For P_(N) generated based on motionvectors of vertically (horizontally) neighboring sub-block, pixels inthe same row (column) of P_(N) are added to P_(C) with a same weightingfactor. It is noted that BIO is also applied for the derivation of theprediction block Pn.

In JEM, for a CU with size less than or equal to 256 luma samples, a CUlevel flag is signaled to indicate whether OBMC is applied or not forthe current CU. For the CUs with size larger than 256 luma samples ornot coded with AMVP mode, OBMC is applied by default. At encoder, whenOBMC is applied for a CU, its impact is taken into account during motionestimation stage. The prediction signal by using motion information ofthe top neighboring block and the left neighboring block is used tocompensate the top and left boundaries of the original signal of thecurrent CU, and then the normal motion estimation process is applied.

The techniques of this disclosure may address some or all of the issuesintroduced above. All the DMVD-related methods (BIO, FRUC BilateralMatching, FRUC Template Matching, Bilateral Template matching and so on)may provide significant bit-rate reductions. However, the codingcomplexity of the DMVD methods are high. Moreover, there is redundantsignaling in the current FRUC design. This disclosure introducestechniques that may modify and/or simplify DMVD. The techniques of thisdisclosure are described below. The described techniques may be appliedindividually. In some examples, any combination of them may be applied.

The techniques of this disclosure include on/off controls for DMVDmodes. In one example, video decoder 30 may explicitly determine theon/off of the DMVD modes by the signaled syntax in the bitstreams. Inanother example, video decoder 30 may implicitly determine the on/off ofthe DMVD modes based on the coded information. The coding informationmay include but not limited to the coded modes of spatial or temporalneighboring blocks, the coded modes of current block, the POCinformation of current POC and the reference pictures POC or theLow-delay condition (LDC) of current slice and so on. The Low-delaycondition (LDC) is a condition whether all the reference pictures ofcurrent slice are before the current slice in terms of display order.When all the reference pictures of a current slice are all before thecurrent slice, the LDC is set to true; otherwise, the LDC is set tofalse.

In one example, video decoder 30 may determine that the sub-block levelFRUC template Matching is enabled based on the LDC of the current slicebeing true and determine that sub-block level FRUC template matching isdisabled based on the LDC of the current slice being false.

The techniques of this disclosure also include constraints for DMVDmodes. In one example, the MV derivation of DMVD modes is constrained tobe performed on some conditions. Example conditions are described below,but other conditions may also be used.

In a first example, video decoder 30 may only perform MV derivation whenthe reference index is equal to one or several predetermined number N.In some examples, N may be equal to 0, an index of 0 corresponding tothe first picture in a reference picture list, which may frequently bethe reference picture that provides the best prediction due to the firstreference picture being nearest to the current picture of having alowest quantization parameter. This condition may be checked for List 0or List1 separately or jointly. In one example, when current block is abi-prediction inter block and is checked jointly, MV derivation is onlyperformed when both L0 and L1 reference index are equal to one orseveral predetermined number N (e.g. N=0). In another example, whenchecked separately, MV derivation is performed when either L0 and L1reference index is equal to one or several predetermined number N (e.g.N=0).

In a second example, for a DMVD mode, video decoder 30 may only use a MVcandidate when the MV candidate is within a pre-determined range. Therange can be pre-defined or signaled in the bitstream. Thepre-determined range may limit the number of motion vectors that have tobe checked and thus reduce memory access bandwidth and overall codingcomplexity.

In a third example, for a DMVD mode, video decoder 30 may only performMV derivation when the POC distance between the reference picture andcurrent picture is smaller than or equal to a predetermined number N(e.g. N=4). Video decoder 30 may check this condition for List 0 orList1 separately or jointly. In one example, when checked jointly, videodecoder 30 may only perform MV derivation when the POC distance betweenthe reference picture and current picture is smaller than or equal to apredetermined number N (e.g., N=4) for both lists. In another example,when checked jointly, video decoder 30 may only perform MV derivationwhen the POC distance between the reference picture and current pictureis smaller than or equal to a predetermined number N (e.g. N=4) foreither L0 or L1.

In another example, video decoder 30 may first derive an initial motionvector for a CU coded using a FRUC bilateral matching or a FRUC templatematching mode for the following local search. Video decoder 30 may testonly the MV candidate which has reference index equal to zero for bothlist0 and list1 to select the initial motion vector for furtherrefinement. In another example, video decoder 30 may first derive aninitial motion vector for a CU coded using FRUC bilateral matching orFRUC template matching mode for the following local search. Only the MVcandidate which are within a range are tested to select the initialmotion vector for further refinement. In another example, the BilateralTemplate Matching is not applied to the MVs which has non-zero referenceindex in either List0 or List1 MVs. In another example, the BIO is notapplied to the MVs which has non-zero reference index in either List0 orList1 MVs.

In another example, the on/off switch of BIO can be performed in a waythat if the SAD between the interpolated pixels P0 and P1 is larger thana threshold, BIO is disabled as the motion trajectory of block may besub-optimal in terms of finding the same objects. In another example,the SAD values between the template of the current reconstructed frameand the associated area in Ref0/Ref1 are calculated. If the ratio of theSAD values are far greater than 1 (or far less than 1), BIO is disabled.The threshold value can be pre-determined or signaled throughSPS/PPS/Slice Header.

The techniques of this disclosure also include constraints of signalingfruc_mode. When the FRUC flag is true, an additional FRUC mode flag (orindex) is signaled to indicate which method (bilateral matching ortemplate matching) is to be used to derive motion information for theblock. However, bilateral matching can work only when there is at leasttwo different reference pictures for the current picture. In JEM,fruc_mode is signaled only when slice_type !=P_slice. However, even ifthe current picture is a B-slice, it is also possible that there is onlyone reference picture for the current picture, meaning there is only onereference picture in reference List 0 and only one reference picture inreference List 1, and the reference pictures are the same picture. Insuch a case, the decoder will perform in an unknown way if fruc_modeindicates bilateral matching being used. To address this issue, severalsolutions are proposed.

In one example, if there is only one reference picture in reference List0 and only one reference picture in reference List 1, and the referencepictures are the same picture, then the fruc_mode flag (which indicateswhether FRUC bilateral matching is applied for a block) may not besignaled. Other FRUC modes (e.g. template matching) may be doneimplicitly in this case. An exemplary syntax table is

fruc_flag u(1) if(fruc_flag){ if(slice_type != P_slice &&!(refList0_number == 1 && refList1_number == 1 && refList0_refPOC[0] ==refList1_refPOC[0])){ fruc_mode u(1) } }

In another example, FRUC mode flag is signaled as defined in JEM. But itis omitted in case when bilateral matching cannot work. For example,when there is only one reference picture in reference List 0 and onlyone reference picture in reference List 1, and the reference picturesare the same picture, then the FRUC mode flag may be signaled, but thevalue of the FRUC mode flag may be omitted or ignored, meaning templatematching will be applied regardless of whether the value of the FRUCmode flag is 0 or 1.

FIG. 12 is a block diagram illustrating an example video encoder 20 thatmay implement the techniques described in this disclosure. Video encoder20 may perform intra- and inter-coding of video blocks within videoslices. Intra-coding relies on spatial prediction to reduce or removespatial redundancy in video within a given video frame or picture.Inter-coding relies on temporal prediction to reduce or remove temporalredundancy in video within adjacent frames or pictures of a videosequence. Intra-mode (I mode) may refer to any of several spatial basedcompression modes. Inter-modes, such as uni-directional prediction (Pmode) or bi-prediction (B mode), may refer to any of severaltemporal-based compression modes.

In the example of FIG. 12, video encoder 20 includes a video data memory33, partitioning unit 35, prediction processing unit 41, summer 50,transform processing unit 52, quantization unit 54, entropy encodingunit 56. Prediction processing unit 41 includes motion estimation unit(MEU) 42, motion compensation unit (MCU) 44, and intra prediction unit46. For video block reconstruction, video encoder 20 also includesinverse quantization unit 58, inverse transform processing unit 60,summer 62, filter unit 64, and decoded picture buffer (DPB) 66.

As shown in FIG. 12, video encoder 20 receives video data and stores thereceived video data in video data memory 33. Video data memory 33 maystore video data to be encoded by the components of video encoder 20.The video data stored in video data memory 33 may be obtained, forexample, from video source 18. DPB 66 may be a reference picture memorythat stores reference video data for use in encoding video data by videoencoder 20, e.g., in intra- or inter-coding modes. Video data memory 33and DPB 66 may be formed by any of a variety of memory devices, such asdynamic random access memory (DRAM), including synchronous DRAM (SDRAM),magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types ofmemory devices. Video data memory 33 and DPB 66 may be provided by thesame memory device or separate memory devices. In various examples,video data memory 33 may be on-chip with other components of videoencoder 20, or off-chip relative to those components.

Partitioning unit 35 retrieves the video data from video data memory 33and partitions the video data into video blocks. This partitioning mayalso include partitioning into slices, tiles, or other larger units, aswells as video block partitioning, e.g., according to a quadtreestructure of LCUs and CUs. Video encoder 20 generally illustrates thecomponents that encode video blocks within a video slice to be encoded.The slice may be divided into multiple video blocks (and possibly intosets of video blocks referred to as tiles). Prediction processing unit41 may select one of a plurality of possible coding modes, such as oneof a plurality of intra coding modes or one of a plurality of intercoding modes, for the current video block based on error results (e.g.,coding rate and the level of distortion). Prediction processing unit 41may provide the resulting intra- or inter-coded block to summer 50 togenerate residual block data and to summer 62 to reconstruct the encodedblock for use as a reference picture.

Intra prediction unit 46 within prediction processing unit 41 mayperform intra-predictive coding of the current video block relative toone or more neighboring blocks in the same frame or slice as the currentblock to be coded to provide spatial compression. Motion estimation unit42 and motion compensation unit 44 within prediction processing unit 41perform inter-predictive coding of the current video block relative toone or more predictive blocks in one or more reference pictures toprovide temporal compression. Motion estimation unit 42 and motioncompensation unit 44 may be configured to perform DMVD in accordancewith the techniques described in this disclosure.

Motion estimation unit 42 may be configured to determine theinter-prediction mode for a video slice according to a predeterminedpattern for a video sequence. The predetermined pattern may designatevideo slices in the sequence as P slices or B slices. Motion estimationunit 42 and motion compensation unit 44 may be highly integrated, butare illustrated separately for conceptual purposes. Motion estimation,performed by motion estimation unit 42, is the process of generatingmotion vectors, which estimate motion for video blocks. A motion vector,for example, may indicate the displacement of a PU of a video blockwithin a current video frame or picture relative to a predictive blockwithin a reference picture.

A predictive block is a block that is found to closely match the PU ofthe video block to be coded in terms of pixel difference, which may bedetermined by sum of absolute difference (SAD), sum of square difference(SSD), or other difference metrics. In some examples, video encoder 20may calculate values for sub-integer pixel positions of referencepictures stored in DPB 66. For example, video encoder 20 may interpolatevalues of one-quarter pixel positions, one-eighth pixel positions, orother fractional pixel positions of the reference picture. Therefore,motion estimation unit 42 may perform a motion search relative to thefull pixel positions and fractional pixel positions and output a motionvector with fractional pixel precision.

Motion estimation unit 42 calculates a motion vector for a PU of a videoblock in an inter-coded slice by comparing the position of the PU to theposition of a predictive block of a reference picture. The referencepicture may be selected from a first reference picture list (List 0) ora second reference picture list (List 1), each of which identify one ormore reference pictures stored in DPB 66. Motion estimation unit 42sends the calculated motion vector to entropy encoding unit 56 andmotion compensation unit 44.

Motion compensation, performed by motion compensation unit 44, mayinvolve fetching or generating the predictive block based on the motionvector determined by motion estimation, possibly performinginterpolations to sub-pixel precision. Upon receiving the motion vectorfor the PU of the current video block, motion compensation unit 44 maylocate the predictive block to which the motion vector points in one ofthe reference picture lists. Video encoder 20 forms a residual videoblock by subtracting pixel values of the predictive block from the pixelvalues of the current video block being coded, forming pixel differencevalues. The pixel difference values form residual data for the block,and may include both luma and chroma difference components. Summer 50represents the component or components that perform this subtractionoperation. Motion compensation unit 44 may also generate syntax elementsassociated with the video blocks and the video slice for use by videodecoder 30 in decoding the video blocks of the video slice.

After prediction processing unit 41 generates the predictive block forthe current video block, either via intra prediction or interprediction, video encoder 20 forms a residual video block by subtractingthe predictive block from the current video block. The residual videodata in the residual block may be included in one or more TUs andapplied to transform processing unit 52. Transform processing unit 52transforms the residual video data into residual transform coefficientsusing a transform, such as a discrete cosine transform (DCT) or aconceptually similar transform. Transform processing unit 52 may convertthe residual video data from a pixel domain to a transform domain, suchas a frequency domain.

Transform processing unit 52 may send the resulting transformcoefficients to quantization unit 54. Quantization unit 54 quantizes thetransform coefficients to further reduce bit rate. The quantizationprocess may reduce the bit depth associated with some or all of thecoefficients. The degree of quantization may be modified by adjusting aquantization parameter. In some examples, quantization unit 54 may thenperform a scan of the matrix including the quantized transformcoefficients. In another example, entropy encoding unit 56 may performthe scan.

Following quantization, entropy encoding unit 56 entropy encodes thequantized transform coefficients. For example, entropy encoding unit 56may perform context adaptive variable length coding (CAVLC), contextadaptive binary arithmetic coding (CABAC), syntax-based context-adaptivebinary arithmetic coding (SBAC), probability interval partitioningentropy (PIPE) coding or another entropy encoding methodology ortechnique. Following the entropy encoding by entropy encoding unit 56,the encoded bitstream may be transmitted to video decoder 30, orarchived for later transmission or retrieval by video decoder 30.Entropy encoding unit 56 may also entropy encode the motion vectors andthe other syntax elements for the current video slice being coded.

Inverse quantization unit 58 and inverse transform processing unit 60apply inverse quantization and inverse transformation, respectively, toreconstruct the residual block in the pixel domain for later use as areference block of a reference picture. Motion compensation unit 44 maycalculate a reference block by adding the residual block to a predictiveblock of one of the reference pictures within one of the referencepicture lists. Motion compensation unit 44 may also apply one or moreinterpolation filters to the reconstructed residual block to calculatesub-integer pixel values for use in motion estimation. Summer 62 addsthe reconstructed residual block to the motion compensated predictionblock produced by motion compensation unit 44 to produce a reconstructedblock.

Filter unit 64 filters the reconstructed block (e.g. the output ofsummer 62) and stores the filtered reconstructed block in DPB 66 foruses as a reference block. The reference block may be used by motionestimation unit 42 and motion compensation unit 44 as a reference blockto inter-predict a block in a subsequent video frame or picture. Filterunit 64 is intended to represent any or any combination of a deblockfilter, a sample adaptive offset (SAO) filter, and adaptive loop filter(ALF), or any other type of loop filters. A deblock filter may, forexample, apply deblocking filtering to filter block boundaries to removeblockiness artifacts from reconstructed video. An SAO filter may applyoffsets to reconstructed pixel values in order to improve overall codingquality. Additional loop filters (in loop or post loop) may also beused.

FIG. 13 is a block diagram illustrating an example video decoder 30 thatmay implement the techniques described in this disclosure. Video decoder30 of FIG. 13 may, for example, be configured to receive the signalingdescribed above with respect to video encoder 20 of FIG. 12. In theexample of FIG. 13, video decoder 30 includes video data memory 78,entropy decoding unit 80, prediction processing unit 81, inversequantization unit 86, inverse transform processing unit 88, summer 90,filter unit 92, and DPB 94. Prediction processing unit 81 includesmotion compensation unit 82 and intra prediction unit 84. Video decoder30 may, in some examples, perform a decoding pass generally reciprocalto the encoding pass described with respect to video encoder 20 fromFIG. 12.

During the decoding process, video decoder 30 receives an encoded videobitstream that represents video blocks of an encoded video slice andassociated syntax elements from video encoder 20. Video decoder 20stores the received encoded video bitstream in video data memory 78.Video data memory 78 may store video data, such as an encoded videobitstream, to be decoded by the components of video decoder 30. Thevideo data stored in video data memory 78 may be obtained, for example,via link 16, from storage device 26, or from a local video source, suchas a camera, or by accessing physical data storage media. Video datamemory 78 may form a coded picture buffer (CPB) that stores encodedvideo data from an encoded video bitstream. DPB 94 may be a referencepicture memory that stores reference video data for use in decodingvideo data by video decoder 30, e.g., in intra- or inter-coding modes.Video data memory 78 and DPB 94 may be formed by any of a variety ofmemory devices, such as DRAM, SDRAM, MRAM, RRAM, or other types ofmemory devices. Video data memory 78 and DPB 94 may be provided by thesame memory device or separate memory devices. In various examples,video data memory 78 may be on-chip with other components of videodecoder 30, or off-chip relative to those components.

Entropy decoding unit 80 of video decoder 30 entropy decodes the videodata stored in video data memory 78 to generate quantized coefficients,motion vectors, and other syntax elements. Entropy decoding unit 80forwards the motion vectors and other syntax elements to predictionprocessing unit 81. Video decoder 30 may receive the syntax elements atthe video slice level and/or the video block level.

When the video slice is coded as an intra-coded (I) slice, intraprediction unit 84 of prediction processing unit 81 may generateprediction data for a video block of the current video slice based on asignaled intra prediction mode and data from previously decoded blocksof the current frame or picture. When the video frame is coded as aninter-coded slice (e.g., B slice or P slice), motion compensation unit82 of prediction processing unit 81 produces predictive blocks for avideo block of the current video slice based on the motion vectors andother syntax elements received from entropy decoding unit 80. Thepredictive blocks may be produced from one of the reference pictureswithin one of the reference picture lists. Video decoder 30 mayconstruct the reference frame lists, List 0 and List 1, using defaultconstruction techniques based on reference pictures stored in DPB 94.

Motion compensation unit 82, in conjunction with other parts of videodecoder 30, may be configured to perform DMVD in accordance with thetechniques described in this disclosure. Motion compensation unit 82determines prediction information for a video block of the current videoslice by parsing the motion vectors and other syntax elements, and usesthe prediction information to produce the predictive blocks for thecurrent video block being decoded. For example, motion compensation unit82 uses some of the received syntax elements to determine a predictionmode (e.g., intra- or inter-prediction) used to code the video blocks ofthe video slice, an inter-prediction slice type (e.g., B slice or Pslice), construction information for one or more of the referencepicture lists for the slice, motion vectors for each inter-encoded videoblock of the slice, inter-prediction status for each inter-coded videoblock of the slice, and other information to decode the video blocks inthe current video slice.

Motion compensation unit 82 may also perform interpolation based oninterpolation filters. Motion compensation unit 82 may use interpolationfilters as used by video encoder 20 during encoding of the video blocksto calculate interpolated values for sub-integer pixels of referenceblocks. In this case, motion compensation unit 82 may determine theinterpolation filters used by video encoder 20 from the received syntaxelements and use the interpolation filters to produce predictive blocks.

Inverse quantization unit 86 inverse quantizes, i.e., de-quantizes, thequantized transform coefficients provided in the bitstream and decodedby entropy decoding unit 80. The inverse quantization process mayinclude use of a quantization parameter calculated by video encoder 20for each video block in the video slice to determine a degree ofquantization and, likewise, a degree of inverse quantization that shouldbe applied. Inverse transform processing unit 88 applies an inversetransform, e.g., an inverse DCT, an inverse integer transform, or aconceptually similar inverse transform process, to the transformcoefficients in order to produce residual blocks in the pixel domain.

After prediction processing unit generates the predictive block for thecurrent video block using, for example, intra or inter prediction, videodecoder 30 forms a reconstructed video block by summing the residualblocks from inverse transform processing unit 88 with the correspondingpredictive blocks generated by motion compensation unit 82. Summer 90represents the component or components that perform this summationoperation.

Filter unit 92 represents any or any combination of a deblocking filter,an SAO filter, and ALF, or any other type of loop filter (either in thecoding loop or after the coding loop). The decoded video blocks in agiven frame or picture are then stored in DPB 94, which stores referencepictures used for subsequent motion compensation. DPB 94 may be part ofor separate from additional memory that stores decoded video for laterpresentation on a display device, such as display device 32 of FIG. 1.

FIG. 14 is a flow diagram illustrating an example video decodingtechnique described in this disclosure. The techniques of FIG. 14 willbe described with reference to a generic video decoder, such as but notlimited to video decoder 30. In some instances, the techniques of FIG.14 may be performed by a video encoder such as video encoder 20, inwhich case the generic video decoder corresponds to the decoding loop ofthe video encoder.

In the example of FIG. 14, the video decoder determines a block of videodata is coded in an inter prediction mode (202). The video decoderimplicitly determines that a DMVD mode is enabled for the block of videodata (204). The DMVD mode may, for example, be one of a pattern matchedmotion vector derivation mode, a bi-directional optical flow mode, abilateral template matching mode, or an overlapped block motioncompensation mode, or another DMVD mode.

In one example, to implicitly determine that the DMVD mode is enabledfor the block of video data, the video decoder may determine that theDMVD mode is enabled for the block of video data based on modes used tocode one or more neighboring blocks of the block of video data. The oneor more neighboring blocks may be either temporal neighboring blocks orspatial neighboring blocks. In another example, to implicitly determinethat the DMVD mode is enabled for the block of video data, the videodecoder may determine that the DMVD mode (e.g., a FRUC template matchingmode) is enabled for the block of video data in response to a low-delaycondition for a current slice comprising the block of video data beingtrue, where the low-delay condition requires all reference pictures ofthe current slice to be before the current slice in display order.

In another example, to implicitly determine that the DMVD mode isenabled for the block of video data, the video decoder may determinethat the DMVD mode is enabled for the block of video data in response tothe block of video data being a B-slice, a first reference picture listfor the block of video data including only one reference picture, asecond reference picture list for the block of video data including onlyone reference picture, and the only one reference picture of the firstreference picture list and the only one reference picture of the secondreference picture list being a same reference picture. In anotherexample, to determine the motion information for the block of videodata, the video decoder may determine a reference index for the block ofvideo data, and to implicitly determine that the DMVD mode is enabledfor the block of video data, the video decoder may determine that theDMVD mode is enabled for the block of video data in response todetermining that a value of the reference index for the block of videodata is equal to zero.

The video decoder determines motion information for the block of videodata (206). The motion information, for example, includes some or all ofa motion vector, a motion vector precision, and a reference pictureindex. The video decoder uses the motion information to determine areference block in accordance with the DMVD mode (208). The videodecoder generates a predictive block for the block of video data basedon the reference block (210). The video decoder may add residual data tothe predictive block to generate a reconstructed block of video data andprocess the reconstructed block of video data to generate a decodedblock of video data. The processing may, for example, includes one ormore in-loop or post-loop filtering operations.

The video decoder outputs the decoded block of video data. In instanceswhere the video decoder is part of a video encoder, then the videodecoder may output the decoded block of video data by storing a pictureincluding the decoded block of video data in a decoded picture bufferfor use as reference picture in encoding subsequent pictures of videodata. In instances where the video decoder is decoding the video datafor display, then the video decoder may output the decoded block ofvideo data by storing a picture including the decoded block of videodata in a decoded picture buffer for use as reference picture indecoding subsequent pictures of video data and by outputting the pictureincluding the decoded block of video data to a display device.

In one or more examples, the functions described may be implemented inhardware, software, firmware, or any combination thereof. If implementedin software, the functions may be stored on or transmitted over, as oneor more instructions or code, a computer-readable medium and executed bya hardware-based processing unit. Computer-readable media may includecomputer-readable storage media, which corresponds to a tangible mediumsuch as data storage media, or communication media including any mediumthat facilitates transfer of a computer program from one place toanother, e.g., according to a communication protocol. In this manner,computer-readable media generally may correspond to (1) tangiblecomputer-readable storage media which is non-transitory or (2) acommunication medium such as a signal or carrier wave. Data storagemedia may be any available media that can be accessed by one or morecomputers or one or more processors to retrieve instructions, codeand/or data structures for implementation of the techniques described inthis disclosure. A computer program product may include acomputer-readable medium.

By way of example, and not limitation, such computer-readable storagemedia can comprise RAM, ROM, EEPROM, CD-ROM or other optical diskstorage, magnetic disk storage, or other magnetic storage devices, flashmemory, or any other medium that can be used to store desired programcode in the form of instructions or data structures and that can beaccessed by a computer. Also, any connection is properly termed acomputer-readable medium. For example, if instructions are transmittedfrom a website, server, or other remote source using a coaxial cable,fiber optic cable, twisted pair, digital subscriber line (DSL), orwireless technologies such as infrared, radio, and microwave, then thecoaxial cable, fiber optic cable, twisted pair, DSL, or wirelesstechnologies such as infrared, radio, and microwave are included in thedefinition of medium. It should be understood, however, thatcomputer-readable storage media and data storage media do not includeconnections, carrier waves, signals, or other transient media, but areinstead directed to non-transient, tangible storage media. Disk anddisc, as used herein, includes compact disc (CD), laser disc, opticaldisc, digital versatile disc (DVD), floppy disk and Blu-ray disc, wheredisks usually reproduce data magnetically, while discs reproduce dataoptically with lasers. Combinations of the above should also be includedwithin the scope of computer-readable media.

Instructions may be executed by one or more processors, such as one ormore digital signal processors (DSPs), general purpose microprocessors,application specific integrated circuits (ASICs), field programmablelogic arrays (FPGAs), or other equivalent integrated or discrete logiccircuitry. Accordingly, the term “processor,” as used herein may referto any of the foregoing structure or any other structure suitable forimplementation of the techniques described herein. In addition, in someaspects, the functionality described herein may be provided withindedicated hardware and/or software modules configured for encoding anddecoding, or incorporated in a combined codec. Also, the techniquescould be fully implemented in one or more circuits or logic elements.

The techniques of this disclosure may be implemented in a wide varietyof devices or apparatuses, including a wireless handset, an integratedcircuit (IC) or a set of ICs (e.g., a chip set). Various components,modules, or units are described in this disclosure to emphasizefunctional aspects of devices configured to perform the disclosedtechniques, but do not necessarily require realization by differenthardware units. Rather, as described above, various units may becombined in a codec hardware unit or provided by a collection ofinteroperative hardware units, including one or more processors asdescribed above, in conjunction with suitable software and/or firmware.

Various examples have been described. These and other examples arewithin the scope of the following claims.

What is claimed is:
 1. A method of decoding video data, the methodcomprising: determining a block of video data is coded in an interprediction mode; implicitly determining that a decoder-side motionvector derivation (DMVD) mode is enabled for the block of video data,wherein implicitly determining that the DMVD mode is enabled for theblock of video data comprises determining that the DMVD mode is enabledfor the block of video data in response to: the block of video databeing a B-slice; a first reference picture list for the block of videodata including only one reference picture; a second reference picturelist for the block of video data including only one reference picture;and the only one reference picture of the first reference picture listand the only one reference picture of the second reference picture listbeing a same reference picture; determining motion information for theblock of video data; using the motion information, determining areference block in accordance with the DMVD mode; and generating apredictive block for the block of video data based on the referenceblock.
 2. The method of claim 1, wherein the motion informationcomprises some or all of a motion vector, a motion vector precision, anda reference picture index.
 3. The method of claim 1, wherein the DMVDmode comprises one of a pattern matched motion vector derivation mode, abi-directional optical flow mode, a bilateral template matching mode, oran overlapped block motion compensation mode.
 4. The method of claim 1,further comprising: adding residual data to the predictive block togenerate a reconstructed block of video data; processing thereconstructed block of video data to generate a decoded block of videodata; outputting the decoded block of video data.
 5. The method of claim1, wherein the method is performed as part of a decoding loop of a videoencoding process.
 6. A device for decoding video data, the devicecomprising: a memory configured to store the video data; and one or moreprocessors configured to: determine a block of video data is coded in aninter prediction mode; implicitly determine that a decoder-side motionvector derivation (DMVD) mode is enabled for the block of video data,wherein the one or more processors implicitly determine that the DMVDmode is enabled for the block of video data in response to: the block ofvideo data being a B-slice; a first reference picture list for the blockof video data including only one reference picture; a second referencepicture list for the block of video data including only one referencepicture; and the only one reference picture of the first referencepicture list and the only one reference picture of the second referencepicture list being a same reference picture; determine motioninformation for the block of video data; use the motion information,determining a reference block in accordance with the DMVD mode; andgenerate a predictive block for the block of video data based on thereference block.
 7. The device of claim 6, wherein the motioninformation comprises some or all of a motion vector, a motion vectorprecision, and a reference picture index.
 8. The device of claim 6,wherein the DMVD mode comprises one of a pattern matched motion vectorderivation mode, a bi-directional optical flow mode, a bilateraltemplate matching mode, or an overlapped block motion compensation mode.9. The device of claim 6, wherein the one or more processors areconfigured to: add residual data to the predictive block to generate areconstructed block of video data; process the reconstructed block ofvideo data to generate a decoded block of video data; output the decodedblock of video data.
 10. The device of claim 6, wherein the device isconfigured to decode the video data as part of a decoding loop of avideo encoding process.
 11. The device of claim 6, wherein the devicecomprises a wireless communication device, further comprising a receiverconfigured to receive encoded video data.
 12. The device of claim 11,wherein the wireless communication device comprises a telephone handsetand wherein the receiver is configured to demodulate, according to awireless communication standard, a signal comprising the encoded videodata.
 13. The device of claim 6, wherein the device comprises a wirelesscommunication device, further comprising a transmitter configured totransmit encoded video data.
 14. The device of claim 13, wherein thewireless communication device comprises a telephone handset and whereinthe transmitter is configured to modulate, according to a wirelesscommunication standard, a signal comprising the encoded video data. 15.A non-transitory computer-readable storage medium storing instructionsthat when executed by one or more processors cause the one or moreprocessors to: determine a block of video data is coded in an interprediction mode; implicitly determine that a decoder-side motion vectorderivation (DMVD) mode is enabled for the block of video data, whereinthe instructions cause the one or more processors to implicitlydetermine that the DMVD mode is enabled for the block of video data inresponse to: the block of video data being a B-slice; a first referencepicture list for the block of video data including only one referencepicture; a second reference picture list for the block of video dataincluding only one reference picture; and the only one reference pictureof the first reference picture list and the only one reference pictureof the second reference picture list being a same reference picture;determine motion information for the block of video data; use the motioninformation, determining a reference block in accordance with the DMVDmode; and generate a predictive block for the block of video data basedon the reference block.
 16. The non-transitory computer-readable storagemedium of claim 15, wherein the motion information comprises some or allof a motion vector, a motion vector precision, and a reference pictureindex.
 17. The non-transitory computer-readable storage medium of claim15, wherein the DMVD mode comprises one of a pattern matched motionvector derivation mode, a bi-directional optical flow mode, a bilateraltemplate matching mode, or an overlapped block motion compensation mode.18. The non-transitory computer-readable storage medium of claim 15,storing further instructions that when executed by the one or moreprocessors cause the one or more processors to: add residual data to thepredictive block to generate a reconstructed block of video data;process the reconstructed block of video data to generate a decodedblock of video data; output the decoded block of video data.